/*
 * Copyright (c) 2007-2008, mSpoke. All Rights Reserved.
 */
package org.bc.iterate;

import java.util.Collection;

public class CollectionClosure<T> implements Closure<T>
{
    private Collection<T> results;

    public CollectionClosure(Collection<T> results)
    {
        //noinspection AssignmentToCollectionOrArrayFieldFromParameter
        this.results = results;
    }

    public void apply(T item)
    {
        results.add(item);
    }
}
